/*=====================================================================================================================
                    Copyright(c) 2005 Geometric PLM Software Corp. All rights reserved.
                             Unpublished - All rights reserved
=======================================================================================================================
File description:
    Filename: tc_aom.h
    Module  : (geometric) itk module.

        This file manages the operations of the application object module.

=======================================================================================================================
Date               Name              Description of Change
14-Jul-2009        Penn,Xie          Initialize creation
$HISTORY$
=====================================================================================================================*/
#ifndef GITK_TC_AOM_H
#define GITK_TC_AOM_H

#ifdef __cplusplus
    extern "C"
    {
#endif

    /**
    * Gets the string value of the appointed property.
    * @param objectTag - <I>  the object tag
    * @param propName  - <I>  the property name
    * @param value     - <OF> the property value
    * @return - ITK_ok or error code
    *
    *   This operation only supports some property types which can be used as string convertion, 
    *   like PROP_string,PROP_logical,PROP_int.
    */
    extern int GAOM_get_attr_value( tag_t objectTag, const char *propName, char **value );

    /**
    * Gets the UIF value.
    * @param objectTag - <I>  the object tag
    * @param propName  - <I>  the property name
    * @param value     - <OF> the property value
    * @return - ITK_ok or error code
    */
    extern int GAOM_get_UIF_attr_value( tag_t objectTag, const char *propName, char **value );

    /**
    * Gets the UIF value, if the property is one tag, return its item_id which is as the property of item.
    *
    * [Only Fiberhome]
    *
    * @param objectTag - <I>  the object tag
    * @param propName  - <I>  the property name
    * @param value     - <OF> the property value
    * @return - ITK_ok or error code
    */
    extern int GAOM_get_UIF_attr_value_with_itemtag( tag_t objectTag, const char *propName, char **value );

    /**
    * Whether dose the attribute exist?
    * @param objectTag - <I>  the object tag
    * @param propName  - <I>  the property name
    * @return - true/false
    */
    extern logical GAOM_is_attr_exist( tag_t objectTag, const char *propName );

    /**
    * Asks the properties of one form object, and the properties don't inherit form its parent object.
    * @param objectTag - <I>  Unique identifier (tag) of the object instance.
    * @param propCount - <O>  The number of properties associated with the object instance.
    * @param propNames - <OF> The array of property names.
    * @return - ITK_ok or error code
    */
    extern int GAOM_ask_form_prop_names( tag_t objectTag, int *propCount, char ***propNames );

    /**
    * Asks the properties of one form object, and the properties don't inherit form its parent object,
    *   and the properties are belong custom properties for business.
    * 
    * @param objectTag - <I>  Unique identifier (tag) of the object instance.
    * @param propCount - <O>  The number of properties associated with the object instance.
    * @param propNames - <OF> The array of property names.
    * @return - ITK_ok or error code
    */
    extern int GAOM_ask_form_class_prop_names( tag_t objectTag, int *propCount, char ***propNames );

    /**
    * Copies the source property to the destinate property.
    * @param destTag  - <I>  the destinate tag
    * @param destProp - <I>  the dest property name
    * @param srcTag   - <I>  the source tag
    * @param srcProp  - <I>  the source property name
    *
    *       Dont't check whether the destProp/srcProp exists in the destTag/srcTag.
    * @return - ITK_ok or error code
    */
    extern int GAOM_copy_prop( tag_t destTag, const char *destProp, tag_t srcTag, const char *srcProp );

#ifdef __cplusplus
    }
#endif


#endif //GITK_TC_AOM_H
